\(\int (d+e x^2)^2 (a+b \arctan (c x)) \, dx\) [1128]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 124 \[ \int \left (d+e x^2\right )^2 (a+b \arctan (c x)) \, dx=-\frac {b \left (10 c^2 d-3 e\right ) e x^2}{30 c^3}-\frac {b e^2 x^4}{20 c}+d^2 x (a+b \arctan (c x))+\frac {2}{3} d e x^3 (a+b \arctan (c x))+\frac {1}{5} e^2 x^5 (a+b \arctan (c x))-\frac {b \left (15 c^4 d^2-10 c^2 d e+3 e^2\right ) \log \left (1+c^2 x^2\right )}{30 c^5} \]

[Out]

-1/30*b*(10*c^2*d-3*e)*e*x^2/c^3-1/20*b*e^2*x^4/c+d^2*x*(a+b*arctan(c*x))+2/3*d*e*x^3*(a+b*arctan(c*x))+1/5*e^
2*x^5*(a+b*arctan(c*x))-1/30*b*(15*c^4*d^2-10*c^2*d*e+3*e^2)*ln(c^2*x^2+1)/c^5

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {200, 5032, 1608, 1261, 712} \[ \int \left (d+e x^2\right )^2 (a+b \arctan (c x)) \, dx=d^2 x (a+b \arctan (c x))+\frac {2}{3} d e x^3 (a+b \arctan (c x))+\frac {1}{5} e^2 x^5 (a+b \arctan (c x))-\frac {b e x^2 \left (10 c^2 d-3 e\right )}{30 c^3}-\frac {b \left (15 c^4 d^2-10 c^2 d e+3 e^2\right ) \log \left (c^2 x^2+1\right )}{30 c^5}-\frac {b e^2 x^4}{20 c} \]

[In]

Int[(d + e*x^2)^2*(a + b*ArcTan[c*x]),x]

[Out]

-1/30*(b*(10*c^2*d - 3*e)*e*x^2)/c^3 - (b*e^2*x^4)/(20*c) + d^2*x*(a + b*ArcTan[c*x]) + (2*d*e*x^3*(a + b*ArcT
an[c*x]))/3 + (e^2*x^5*(a + b*ArcTan[c*x]))/5 - (b*(15*c^4*d^2 - 10*c^2*d*e + 3*e^2)*Log[1 + c^2*x^2])/(30*c^5
)

Rule 200

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 712

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rule 1261

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[
Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 5032

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With[{u = IntHide[(d + e*x^2
)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[u/(1 + c^2*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x]
&& (IntegerQ[q] || ILtQ[q + 1/2, 0])

Rubi steps \begin{align*} \text {integral}& = d^2 x (a+b \arctan (c x))+\frac {2}{3} d e x^3 (a+b \arctan (c x))+\frac {1}{5} e^2 x^5 (a+b \arctan (c x))-(b c) \int \frac {d^2 x+\frac {2}{3} d e x^3+\frac {e^2 x^5}{5}}{1+c^2 x^2} \, dx \\ & = d^2 x (a+b \arctan (c x))+\frac {2}{3} d e x^3 (a+b \arctan (c x))+\frac {1}{5} e^2 x^5 (a+b \arctan (c x))-(b c) \int \frac {x \left (d^2+\frac {2}{3} d e x^2+\frac {e^2 x^4}{5}\right )}{1+c^2 x^2} \, dx \\ & = d^2 x (a+b \arctan (c x))+\frac {2}{3} d e x^3 (a+b \arctan (c x))+\frac {1}{5} e^2 x^5 (a+b \arctan (c x))-\frac {1}{2} (b c) \text {Subst}\left (\int \frac {d^2+\frac {2 d e x}{3}+\frac {e^2 x^2}{5}}{1+c^2 x} \, dx,x,x^2\right ) \\ & = d^2 x (a+b \arctan (c x))+\frac {2}{3} d e x^3 (a+b \arctan (c x))+\frac {1}{5} e^2 x^5 (a+b \arctan (c x))-\frac {1}{2} (b c) \text {Subst}\left (\int \left (\frac {\left (10 c^2 d-3 e\right ) e}{15 c^4}+\frac {e^2 x}{5 c^2}+\frac {15 c^4 d^2-10 c^2 d e+3 e^2}{15 c^4 \left (1+c^2 x\right )}\right ) \, dx,x,x^2\right ) \\ & = -\frac {b \left (10 c^2 d-3 e\right ) e x^2}{30 c^3}-\frac {b e^2 x^4}{20 c}+d^2 x (a+b \arctan (c x))+\frac {2}{3} d e x^3 (a+b \arctan (c x))+\frac {1}{5} e^2 x^5 (a+b \arctan (c x))-\frac {b \left (15 c^4 d^2-10 c^2 d e+3 e^2\right ) \log \left (1+c^2 x^2\right )}{30 c^5} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.05 \[ \int \left (d+e x^2\right )^2 (a+b \arctan (c x)) \, dx=\frac {c^2 x \left (4 a c^3 \left (15 d^2+10 d e x^2+3 e^2 x^4\right )+b e x \left (6 e-c^2 \left (20 d+3 e x^2\right )\right )\right )+4 b c^5 x \left (15 d^2+10 d e x^2+3 e^2 x^4\right ) \arctan (c x)-2 b \left (15 c^4 d^2-10 c^2 d e+3 e^2\right ) \log \left (1+c^2 x^2\right )}{60 c^5} \]

[In]

Integrate[(d + e*x^2)^2*(a + b*ArcTan[c*x]),x]

[Out]

(c^2*x*(4*a*c^3*(15*d^2 + 10*d*e*x^2 + 3*e^2*x^4) + b*e*x*(6*e - c^2*(20*d + 3*e*x^2))) + 4*b*c^5*x*(15*d^2 +
10*d*e*x^2 + 3*e^2*x^4)*ArcTan[c*x] - 2*b*(15*c^4*d^2 - 10*c^2*d*e + 3*e^2)*Log[1 + c^2*x^2])/(60*c^5)

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.10

method result size
parts \(a \left (\frac {1}{5} x^{5} e^{2}+\frac {2}{3} x^{3} e d +x \,d^{2}\right )+\frac {b \left (\frac {\arctan \left (c x \right ) c \,e^{2} x^{5}}{5}+\frac {2 \arctan \left (c x \right ) c d e \,x^{3}}{3}+\arctan \left (c x \right ) c x \,d^{2}-\frac {5 d \,c^{4} e \,x^{2}+\frac {3 e^{2} c^{4} x^{4}}{4}-\frac {3 e^{2} c^{2} x^{2}}{2}+\frac {\left (15 c^{4} d^{2}-10 c^{2} d e +3 e^{2}\right ) \ln \left (c^{2} x^{2}+1\right )}{2}}{15 c^{4}}\right )}{c}\) \(137\)
derivativedivides \(\frac {\frac {a \left (c^{5} x \,d^{2}+\frac {2}{3} d \,c^{5} e \,x^{3}+\frac {1}{5} e^{2} c^{5} x^{5}\right )}{c^{4}}+\frac {b \left (\arctan \left (c x \right ) c^{5} x \,d^{2}+\frac {2 \arctan \left (c x \right ) d \,c^{5} e \,x^{3}}{3}+\frac {\arctan \left (c x \right ) e^{2} c^{5} x^{5}}{5}-\frac {d \,c^{4} e \,x^{2}}{3}-\frac {e^{2} c^{4} x^{4}}{20}+\frac {e^{2} c^{2} x^{2}}{10}-\frac {\left (15 c^{4} d^{2}-10 c^{2} d e +3 e^{2}\right ) \ln \left (c^{2} x^{2}+1\right )}{30}\right )}{c^{4}}}{c}\) \(153\)
default \(\frac {\frac {a \left (c^{5} x \,d^{2}+\frac {2}{3} d \,c^{5} e \,x^{3}+\frac {1}{5} e^{2} c^{5} x^{5}\right )}{c^{4}}+\frac {b \left (\arctan \left (c x \right ) c^{5} x \,d^{2}+\frac {2 \arctan \left (c x \right ) d \,c^{5} e \,x^{3}}{3}+\frac {\arctan \left (c x \right ) e^{2} c^{5} x^{5}}{5}-\frac {d \,c^{4} e \,x^{2}}{3}-\frac {e^{2} c^{4} x^{4}}{20}+\frac {e^{2} c^{2} x^{2}}{10}-\frac {\left (15 c^{4} d^{2}-10 c^{2} d e +3 e^{2}\right ) \ln \left (c^{2} x^{2}+1\right )}{30}\right )}{c^{4}}}{c}\) \(153\)
parallelrisch \(-\frac {-12 x^{5} \arctan \left (c x \right ) b \,c^{5} e^{2}-12 a \,c^{5} e^{2} x^{5}-40 x^{3} \arctan \left (c x \right ) b \,c^{5} d e +3 b \,c^{4} e^{2} x^{4}-40 a \,c^{5} d e \,x^{3}-60 x \arctan \left (c x \right ) b \,c^{5} d^{2}+20 b \,c^{4} d e \,x^{2}-60 a \,c^{5} d^{2} x +30 \ln \left (c^{2} x^{2}+1\right ) b \,c^{4} d^{2}-6 b \,c^{2} e^{2} x^{2}-20 \ln \left (c^{2} x^{2}+1\right ) b \,c^{2} d e +6 \ln \left (c^{2} x^{2}+1\right ) b \,e^{2}}{60 c^{5}}\) \(173\)
risch \(-\frac {i b \left (3 x^{5} e^{2}+10 x^{3} e d +15 x \,d^{2}\right ) \ln \left (i c x +1\right )}{30}+\frac {i b \,e^{2} x^{5} \ln \left (-i c x +1\right )}{10}+\frac {i b d e \,x^{3} \ln \left (-i c x +1\right )}{3}+\frac {a \,e^{2} x^{5}}{5}+\frac {i b \,d^{2} x \ln \left (-i c x +1\right )}{2}+\frac {2 a d e \,x^{3}}{3}-\frac {b \,e^{2} x^{4}}{20 c}+a \,d^{2} x -\frac {b d e \,x^{2}}{3 c}-\frac {\ln \left (-c^{2} x^{2}-1\right ) b \,d^{2}}{2 c}+\frac {b \,e^{2} x^{2}}{10 c^{3}}+\frac {\ln \left (-c^{2} x^{2}-1\right ) b d e}{3 c^{3}}-\frac {\ln \left (-c^{2} x^{2}-1\right ) b \,e^{2}}{10 c^{5}}\) \(204\)

[In]

int((e*x^2+d)^2*(a+b*arctan(c*x)),x,method=_RETURNVERBOSE)

[Out]

a*(1/5*x^5*e^2+2/3*x^3*e*d+x*d^2)+b/c*(1/5*arctan(c*x)*c*e^2*x^5+2/3*arctan(c*x)*c*d*e*x^3+arctan(c*x)*c*x*d^2
-1/15/c^4*(5*d*c^4*e*x^2+3/4*e^2*c^4*x^4-3/2*e^2*c^2*x^2+1/2*(15*c^4*d^2-10*c^2*d*e+3*e^2)*ln(c^2*x^2+1)))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.21 \[ \int \left (d+e x^2\right )^2 (a+b \arctan (c x)) \, dx=\frac {12 \, a c^{5} e^{2} x^{5} + 40 \, a c^{5} d e x^{3} - 3 \, b c^{4} e^{2} x^{4} + 60 \, a c^{5} d^{2} x - 2 \, {\left (10 \, b c^{4} d e - 3 \, b c^{2} e^{2}\right )} x^{2} + 4 \, {\left (3 \, b c^{5} e^{2} x^{5} + 10 \, b c^{5} d e x^{3} + 15 \, b c^{5} d^{2} x\right )} \arctan \left (c x\right ) - 2 \, {\left (15 \, b c^{4} d^{2} - 10 \, b c^{2} d e + 3 \, b e^{2}\right )} \log \left (c^{2} x^{2} + 1\right )}{60 \, c^{5}} \]

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/60*(12*a*c^5*e^2*x^5 + 40*a*c^5*d*e*x^3 - 3*b*c^4*e^2*x^4 + 60*a*c^5*d^2*x - 2*(10*b*c^4*d*e - 3*b*c^2*e^2)*
x^2 + 4*(3*b*c^5*e^2*x^5 + 10*b*c^5*d*e*x^3 + 15*b*c^5*d^2*x)*arctan(c*x) - 2*(15*b*c^4*d^2 - 10*b*c^2*d*e + 3
*b*e^2)*log(c^2*x^2 + 1))/c^5

Sympy [A] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.56 \[ \int \left (d+e x^2\right )^2 (a+b \arctan (c x)) \, dx=\begin {cases} a d^{2} x + \frac {2 a d e x^{3}}{3} + \frac {a e^{2} x^{5}}{5} + b d^{2} x \operatorname {atan}{\left (c x \right )} + \frac {2 b d e x^{3} \operatorname {atan}{\left (c x \right )}}{3} + \frac {b e^{2} x^{5} \operatorname {atan}{\left (c x \right )}}{5} - \frac {b d^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2 c} - \frac {b d e x^{2}}{3 c} - \frac {b e^{2} x^{4}}{20 c} + \frac {b d e \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{3 c^{3}} + \frac {b e^{2} x^{2}}{10 c^{3}} - \frac {b e^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{10 c^{5}} & \text {for}\: c \neq 0 \\a \left (d^{2} x + \frac {2 d e x^{3}}{3} + \frac {e^{2} x^{5}}{5}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((e*x**2+d)**2*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d**2*x + 2*a*d*e*x**3/3 + a*e**2*x**5/5 + b*d**2*x*atan(c*x) + 2*b*d*e*x**3*atan(c*x)/3 + b*e**2*
x**5*atan(c*x)/5 - b*d**2*log(x**2 + c**(-2))/(2*c) - b*d*e*x**2/(3*c) - b*e**2*x**4/(20*c) + b*d*e*log(x**2 +
 c**(-2))/(3*c**3) + b*e**2*x**2/(10*c**3) - b*e**2*log(x**2 + c**(-2))/(10*c**5), Ne(c, 0)), (a*(d**2*x + 2*d
*e*x**3/3 + e**2*x**5/5), True))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.19 \[ \int \left (d+e x^2\right )^2 (a+b \arctan (c x)) \, dx=\frac {1}{5} \, a e^{2} x^{5} + \frac {2}{3} \, a d e x^{3} + \frac {1}{3} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d e + \frac {1}{20} \, {\left (4 \, x^{5} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac {2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b e^{2} + a d^{2} x + \frac {{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d^{2}}{2 \, c} \]

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/5*a*e^2*x^5 + 2/3*a*d*e*x^3 + 1/3*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*d*e + 1/20*(4*x
^5*arctan(c*x) - c*((c^2*x^4 - 2*x^2)/c^4 + 2*log(c^2*x^2 + 1)/c^6))*b*e^2 + a*d^2*x + 1/2*(2*c*x*arctan(c*x)
- log(c^2*x^2 + 1))*b*d^2/c

Giac [F]

\[ \int \left (d+e x^2\right )^2 (a+b \arctan (c x)) \, dx=\int { {\left (e x^{2} + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )} \,d x } \]

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.75 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.21 \[ \int \left (d+e x^2\right )^2 (a+b \arctan (c x)) \, dx=\frac {a\,e^2\,x^5}{5}+a\,d^2\,x-\frac {b\,d^2\,\ln \left (c^2\,x^2+1\right )}{2\,c}-\frac {b\,e^2\,\ln \left (c^2\,x^2+1\right )}{10\,c^5}-\frac {b\,e^2\,x^4}{20\,c}+\frac {b\,e^2\,x^2}{10\,c^3}+\frac {2\,a\,d\,e\,x^3}{3}+b\,d^2\,x\,\mathrm {atan}\left (c\,x\right )+\frac {b\,e^2\,x^5\,\mathrm {atan}\left (c\,x\right )}{5}+\frac {b\,d\,e\,\ln \left (c^2\,x^2+1\right )}{3\,c^3}-\frac {b\,d\,e\,x^2}{3\,c}+\frac {2\,b\,d\,e\,x^3\,\mathrm {atan}\left (c\,x\right )}{3} \]

[In]

int((a + b*atan(c*x))*(d + e*x^2)^2,x)

[Out]

(a*e^2*x^5)/5 + a*d^2*x - (b*d^2*log(c^2*x^2 + 1))/(2*c) - (b*e^2*log(c^2*x^2 + 1))/(10*c^5) - (b*e^2*x^4)/(20
*c) + (b*e^2*x^2)/(10*c^3) + (2*a*d*e*x^3)/3 + b*d^2*x*atan(c*x) + (b*e^2*x^5*atan(c*x))/5 + (b*d*e*log(c^2*x^
2 + 1))/(3*c^3) - (b*d*e*x^2)/(3*c) + (2*b*d*e*x^3*atan(c*x))/3